<?php
$grades = [
    '一号裁判'=>98.2,
    '二号裁判'=>97.5,
    '三号裁判'=>91,
    '四号裁判'=>89,
    '五号裁判'=>99,
    '六号裁判'=>98.5,
    '七号裁判'=>96.6,
    '八号裁判'=>93.4,
];
$sum=array_sum($grades);
echo  $sum,"\n";
asort($grades);
$v=array_values($grades);
$pj=($sum-$v[0]-$v[count($v)-1])/(count($v)-2);
$pjj=round($pj,2);
$k=array_keys($grades);
print_r($pjj);
echo"打出最低分的裁判为：",$k[0],"打分为：",$v[0],"\n";
echo"打出最高分的裁判为：",$k[0],"打分为：",$v[count($v)-1],"\n";
echo"最后得分为：",$pjj;

